package jpa.entitys.promis.sales;

import java.io.Serializable;

import javax.persistence.*;

import java.math.BigDecimal;
import java.util.Date;


/**
 * The persistent class for the MAILLING_ADDRESSES database table.
 * 
 */
@Entity
@Table(name="MAILLING_ADDRESSES")
@NamedQueries({
    @NamedQuery(name = "MaillingAddress.findAll", query = " SELECT c FROM MaillingAddress c "),
    @NamedQuery(name = "MaillingAddress.findById", query = " SELECT c FROM MaillingAddress c WHERE c.id = :Id "),
    @NamedQuery(name = "MaillingAddress.findByStaging", query = " SELECT c FROM MaillingAddress c WHERE c.syncIsstaging = :syncIsstaging")
})
public class MaillingAddress extends jpa.entitys.common.CommonEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private MaillingAddressPK id;
	
	@Override public String toString() { return org.apache.commons.lang.builder.ToStringBuilder.reflectionToString(this);}

	@Column(name="ADDR_FLAG", length=1)
	private String addrFlag;

	@Column(name="ADDR_TYPE")
	private String addrType;

	@Column(length=300)
	private String address;

	@Column(length=300)
	private String address2;

	@Column(length=300)
	private String address3;

	@Column(length=300)
	private String address4;

	@Column(length=300)
	private String address5;
	
	@Column(name="ALTERNATE_ADDRESS", length=300)
	private String alternateAddress;

	@Column(length=25)
	private String amphoe;

	@Column(name="AMPHUR_CODE", length=2)
	private String amphurCode;

	@Column(name="AR_GL_CODE", length=15)
	private String arGlCode;

	@Column(name="AR_SUB_GL_CODE", length=15)
	private String arSubGlCode;

	@Column(length=20)
	private String city;

	@Column(length=2)
	private String company;

	@Column(name="CONTACT_ADDRESS_FROM")
	private String contactAddressFrom;

	@Column(name="CONTACT_PERSON", length=50)
	private String contactPerson;

	@Column(name="COUNTRY_CODE")
	private String countryCode;

	@Column(name="CREATED_BY", length=30)
	private String createdBy;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="CREATED_ON")
	private Date createdOn;

	@Column(name="CURRENT_BALANCE_AMOUNT", precision=16, scale=2)
	private BigDecimal currentBalanceAmount;

	@Column(name="CURRENT_BALANCE_FC", precision=16, scale=2)
	private BigDecimal currentBalanceFc;

	@Column(name="CUSTOMER_GROUP", length=2)
	private String customerGroup;

	@Column(name="CUSTOMER_NAME_IN_ENGLISH", length=200)
	private String customerNameInEnglish;

	@Column(name="CUSTOMER_NAME_IN_THAI", length=200)
	private String customerNameInThai;

	@Column(name="EMAIL_NUMBER", length=30)
	private String emailNumber;

	@Column(name="FAX_NUMBERS", length=300)
	private String faxNumbers;

	@Column(name="\"LANGUAGE\"", length=1)
	private String language;

	@Column(name="LAST_UPD_BY", length=30)
	private String lastUpdBy;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="LAST_UPD_ON")
	private Date lastUpdOn;

	@Column(name="PHONE_NUMBERS", length=300)
	private String phoneNumbers;

	@Column(name="POSTAL_CODE")
	private String postalCode;

	@Column(length=25)
	private String province;

	@Column(name="PROVINCE_CODE", length=2)
	private String provinceCode;

	@Column(name="REGION_CODE", length=300)
	private String regionCode;

	@Column(length=300)
	private String remarks;

	@Column(name="ROAD_CODE", length=5)
	private String roadCode;

	@Column(name="ROAD_DESC", length=300)
	private String roadDesc;

	@Column(name="ROAD_FLAG", length=1)
	private String roadFlag;

	@Column(precision=22)
	private BigDecimal seq;

	@Column(length=1)
	private String status;

	@Column(name="SYNC_CREATEDBY", length=100)
	private String syncCreatedby;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="SYNC_CREATEDON")
	private Date syncCreatedon;

	@Column(name="SYNC_EXTERNAL_REF_KEY", length=100)
	private String syncExternalRefKey;

	@Column(name="SYNC_EXTERNAL_REF_NO", length=100)
	private String syncExternalRefNo;

	@Column(name="SYNC_ISSTAGING", length=1)
	private String syncIsstaging;

	@Column(name="SYNC_ISSYNC", length=1)
	private String syncIssync;

	@Column(name="SYNC_UPDATEDBY", length=100)
	private String syncUpdatedby;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="SYNC_UPDATEDON")
	private Date syncUpdatedon;

	@Column(length=25)
	private String tambon;

	@Column(name="TAX_ID", precision=10)
	private BigDecimal taxId;

	@Column(name="TENANT_TYPE", length=1)
	private String tenantType;

	@Column(name="TUMBON_CODE", length=2)
	private String tumbonCode;

	@Column(name="YEAR_OPENING_BALANCE_AMOUNT", precision=16, scale=2)
	private BigDecimal yearOpeningBalanceAmount;

	@Column(name="YEAR_OPENING_BALANCE_FC", precision=16, scale=2)
	private BigDecimal yearOpeningBalanceFc;

    public MaillingAddress() {
    }

	public MaillingAddressPK getId() {
		return this.id;
	}

	public void setId(MaillingAddressPK id) {
		this.id = id;
	}
	
	public String getAddrFlag() {
		return this.addrFlag;
	}

	public void setAddrFlag(String addrFlag) {
		this.addrFlag = addrFlag;
	}

	public String getAddrType() {
		return this.addrType;
	}

	public void setAddrType(String addrType) {
		this.addrType = addrType;
	}

	public String getAddress() {
		return this.address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getAddress2() {
		return this.address2;
	}

	public void setAddress2(String address2) {
		this.address2 = address2;
	}

	public String getAddress3() {
		return this.address3;
	}

	public void setAddress3(String address3) {
		this.address3 = address3;
	}

	public String getAddress4() {
		return this.address4;
	}

	public void setAddress4(String address4) {
		this.address4 = address4;
	}

	public String getAddress5() {
		return this.address5;
	}

	public void setAddress5(String address5) {
		this.address5 = address5;
	}

	public String getAlternateAddress() {
		return this.alternateAddress;
	}

	public void setAlternateAddress(String alternateAddress) {
		this.alternateAddress = alternateAddress;
	}

	public String getAmphoe() {
		return this.amphoe;
	}

	public void setAmphoe(String amphoe) {
		this.amphoe = amphoe;
	}

	public String getAmphurCode() {
		return this.amphurCode;
	}

	public void setAmphurCode(String amphurCode) {
		this.amphurCode = amphurCode;
	}

	public String getArGlCode() {
		return this.arGlCode;
	}

	public void setArGlCode(String arGlCode) {
		this.arGlCode = arGlCode;
	}

	public String getArSubGlCode() {
		return this.arSubGlCode;
	}

	public void setArSubGlCode(String arSubGlCode) {
		this.arSubGlCode = arSubGlCode;
	}

	public String getCity() {
		return this.city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getCompany() {
		return this.company;
	}

	public void setCompany(String company) {
		this.company = company;
	}

	public String getContactAddressFrom() {
		return this.contactAddressFrom;
	}

	public void setContactAddressFrom(String contactAddressFrom) {
		this.contactAddressFrom = contactAddressFrom;
	}

	public String getContactPerson() {
		return this.contactPerson;
	}

	public void setContactPerson(String contactPerson) {
		this.contactPerson = contactPerson;
	}

	public String getCountryCode() {
		return this.countryCode;
	}

	public void setCountryCode(String countryCode) {
		this.countryCode = countryCode;
	}

	public String getCreatedBy() {
		return this.createdBy;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}

	public Date getCreatedOn() {
		return this.createdOn;
	}

	public void setCreatedOn(Date createdOn) {
		this.createdOn = createdOn;
	}

	public BigDecimal getCurrentBalanceAmount() {
		return this.currentBalanceAmount;
	}

	public void setCurrentBalanceAmount(BigDecimal currentBalanceAmount) {
		this.currentBalanceAmount = currentBalanceAmount;
	}

	public BigDecimal getCurrentBalanceFc() {
		return this.currentBalanceFc;
	}

	public void setCurrentBalanceFc(BigDecimal currentBalanceFc) {
		this.currentBalanceFc = currentBalanceFc;
	}

	public String getCustomerGroup() {
		return this.customerGroup;
	}

	public void setCustomerGroup(String customerGroup) {
		this.customerGroup = customerGroup;
	}

	public String getCustomerNameInEnglish() {
		return this.customerNameInEnglish;
	}

	public void setCustomerNameInEnglish(String customerNameInEnglish) {
		this.customerNameInEnglish = customerNameInEnglish;
	}

	public String getCustomerNameInThai() {
		return this.customerNameInThai;
	}

	public void setCustomerNameInThai(String customerNameInThai) {
		this.customerNameInThai = customerNameInThai;
	}

	public String getEmailNumber() {
		return this.emailNumber;
	}

	public void setEmailNumber(String emailNumber) {
		this.emailNumber = emailNumber;
	}

	public String getFaxNumbers() {
		return this.faxNumbers;
	}

	public void setFaxNumbers(String faxNumbers) {
		this.faxNumbers = faxNumbers;
	}

	public String getLanguage() {
		return this.language;
	}

	public void setLanguage(String language) {
		this.language = language;
	}

	public String getLastUpdBy() {
		return this.lastUpdBy;
	}

	public void setLastUpdBy(String lastUpdBy) {
		this.lastUpdBy = lastUpdBy;
	}

	public Date getLastUpdOn() {
		return this.lastUpdOn;
	}

	public void setLastUpdOn(Date lastUpdOn) {
		this.lastUpdOn = lastUpdOn;
	}

	public String getPhoneNumbers() {
		return this.phoneNumbers;
	}

	public void setPhoneNumbers(String phoneNumbers) {
		this.phoneNumbers = phoneNumbers;
	}

	public String getPostalCode() {
		return this.postalCode;
	}

	public void setPostalCode(String postalCode) {
		this.postalCode = postalCode;
	}

	public String getProvince() {
		return this.province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public String getProvinceCode() {
		return this.provinceCode;
	}

	public void setProvinceCode(String provinceCode) {
		this.provinceCode = provinceCode;
	}

	public String getRegionCode() {
		return this.regionCode;
	}

	public void setRegionCode(String regionCode) {
		this.regionCode = regionCode;
	}

	public String getRemarks() {
		return this.remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public String getRoadCode() {
		return this.roadCode;
	}

	public void setRoadCode(String roadCode) {
		this.roadCode = roadCode;
	}

	public String getRoadDesc() {
		return this.roadDesc;
	}

	public void setRoadDesc(String roadDesc) {
		this.roadDesc = roadDesc;
	}

	public String getRoadFlag() {
		return this.roadFlag;
	}

	public void setRoadFlag(String roadFlag) {
		this.roadFlag = roadFlag;
	}

	public BigDecimal getSeq() {
		return this.seq;
	}

	public void setSeq(BigDecimal seq) {
		this.seq = seq;
	}

	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getSyncCreatedby() {
		return this.syncCreatedby;
	}

	public void setSyncCreatedby(String syncCreatedby) {
		this.syncCreatedby = syncCreatedby;
	}

	public Date getSyncCreatedon() {
		return this.syncCreatedon;
	}

	public void setSyncCreatedon(Date syncCreatedon) {
		this.syncCreatedon = syncCreatedon;
	}

	public String getSyncExternalRefKey() {
		return this.syncExternalRefKey;
	}

	public void setSyncExternalRefKey(String syncExternalRefKey) {
		this.syncExternalRefKey = syncExternalRefKey;
	}

	public String getSyncExternalRefNo() {
		return this.syncExternalRefNo;
	}

	public void setSyncExternalRefNo(String syncExternalRefNo) {
		this.syncExternalRefNo = syncExternalRefNo;
	}

	public String getSyncIsstaging() {
		return this.syncIsstaging;
	}

	public void setSyncIsstaging(String syncIsstaging) {
		this.syncIsstaging = syncIsstaging;
	}

	public String getSyncIssync() {
		return this.syncIssync;
	}

	public void setSyncIssync(String syncIssync) {
		this.syncIssync = syncIssync;
	}

	public String getSyncUpdatedby() {
		return this.syncUpdatedby;
	}

	public void setSyncUpdatedby(String syncUpdatedby) {
		this.syncUpdatedby = syncUpdatedby;
	}

	public Date getSyncUpdatedon() {
		return this.syncUpdatedon;
	}

	public void setSyncUpdatedon(Date syncUpdatedon) {
		this.syncUpdatedon = syncUpdatedon;
	}

	public String getTambon() {
		return this.tambon;
	}

	public void setTambon(String tambon) {
		this.tambon = tambon;
	}

	public BigDecimal getTaxId() {
		return this.taxId;
	}

	public void setTaxId(BigDecimal taxId) {
		this.taxId = taxId;
	}

	public String getTenantType() {
		return this.tenantType;
	}

	public void setTenantType(String tenantType) {
		this.tenantType = tenantType;
	}

	public String getTumbonCode() {
		return this.tumbonCode;
	}

	public void setTumbonCode(String tumbonCode) {
		this.tumbonCode = tumbonCode;
	}

	public BigDecimal getYearOpeningBalanceAmount() {
		return this.yearOpeningBalanceAmount;
	}

	public void setYearOpeningBalanceAmount(BigDecimal yearOpeningBalanceAmount) {
		this.yearOpeningBalanceAmount = yearOpeningBalanceAmount;
	}

	public BigDecimal getYearOpeningBalanceFc() {
		return this.yearOpeningBalanceFc;
	}

	public void setYearOpeningBalanceFc(BigDecimal yearOpeningBalanceFc) {
		this.yearOpeningBalanceFc = yearOpeningBalanceFc;
	}

}